package cn.yup.service.impl;

import cn.yup.mapper.CustomerMapper;
import cn.yup.query.CustomerQueryObject;
import cn.yup.service.ICustomerService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CustomerServiceImpl implements ICustomerService {
    @Autowired
    private CustomerMapper customerMapper;
    @Override
    public PageInfo selectCustomer(CustomerQueryObject customerQueryObject) {
        PageHelper.startPage(customerQueryObject.getCurrentPage(), customerQueryObject.getPageSize());
        return new PageInfo(customerMapper.selectCustomer(customerQueryObject.getStatus(),customerQueryObject.getKeyword(),customerQueryObject.getSellerId()));
    }
}
